package com.shangguan.mvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.Arrays;
import java.util.List;

/**
 * @ClassName: DispatcherController
 * @Description:
 * @Author: 一尘
 * @Date: 2020 年 04 月 16 20:33
 * @Version 1.0
 */
@Controller
public class DispatcherController {
    @GetMapping("/list")
    public String list(Model model){
        System.out.println("-------------list-----------");
        List<String> list = Arrays.asList("Hello","World","Password","localhost");
        model.addAttribute("list",list);
     return "list";
    }
}
